import { IUserInfo } from '@/store/modules/admin/types'
import server from '@/utils/server'
import { IloginForm, IMenu, IResult } from './types'

export const reqLogin = (data:IloginForm) => {
  return server<IResult<IUserInfo>>({
    method: 'post',
    url: 'login',
    data
  })
}

export const reqMenus = () => {
  return server<IResult<IMenu[]>>({
    method: 'get',
    url: 'menus'
  })
}
